#ifndef MEMBERCARDRECHARGE_H
#define MEMBERCARDRECHARGE_H

#include <QWidget>
#include "personmember.h"

class InquireSql;
class Calendar;
class InquireMemberProfile;

enum LastClickMemberCardRecharge {lineEditInquireMemberCardNumber, lineEditRechargeAmount,
                lineEditRechargeIntegrate, lineEditCashRechargePayment,
                lineEditCUPRechargePayment, comboBoxRechargeStaffName,
                lineEditRechargeDate, pushButtonRecharge};

namespace Ui {
class MemberCardRecharge;
}

class MemberCardRecharge : public QWidget
{
    Q_OBJECT
    
public:
    explicit MemberCardRecharge(QWidget *parent = 0);
    ~MemberCardRecharge();
    void displayMemberInformation(const QString &);
    bool eventFilter(QObject *target, QEvent *event);
    void set_staffName();
    void initRecharge();
    void initMemberInformation();
    
private slots:
    void on_pushButtonRecharge_clicked();

    void slotUpdatelineEditRechargeDate(QString);

    void on_pushButtonInquire_clicked();

    void slotDisplayMemberInformation(QString);

    void on_lineEditRechargeAmount_editingFinished();

    void on_lineEditCashPayment_editingFinished();

    void on_lineEditCUPPayment_editingFinished();

    void on_lineEditRechargeIntegrate_editingFinished();

    void on_lineEditRechargeAmount_textChanged(const QString &arg1);

    void on_pushButtonCancel_clicked();

private:
    void HandleLineEditInquireMemberCardNumber();
    void eliminationPushButtonBorder();
    QString completionPrice(const QString &);
    Ui::MemberCardRecharge *ui;
    int m_lastClick;
    InquireSql *m_sql;
    Calendar *m_calendar;
    PersonMember m_personMember;
    InquireMemberProfile *m_inquireMemberProfile;
    memberList m_memberList;
};

#endif // MEMBERCARDRECHARGE_H
